import request from '@/utils/request'


// 查询退货分页列表
export function listReturnByPage(query) {
  return request({
    url: "/GsReturn/page",
    method: "get",
    params: query,
  });
}
// 查询未处理退货分页列表
export function listReturnStateByPage(query) {
  return request({
    url: "/GsReturn/state/未处理",
    method: "get",
    params: query,
  });
}
// 查询已完成退货分页列表
export function listReturnStatedAByPage(query) {
  return request({
    url: "/GsReturn/state/已退货",
    method: "get",
    params: query,
  });
}
// 查询已拒绝退货分页列表
export function listReturnStatedFByPage(query) {
  return request({
    url: "/GsReturn/state/已拒绝",
    method: "get",
    params: query,
  });
}

// 查询退货申请明细
export function getReturn(orderId) {
  return request({
    url: "/GsReturn/" + orderId,
    method: "get",
    });
}


// 录入退货申请信息
export function enterGsReturn(orderId, returnCause) {
  return request({
    url: '/GsReturn/' + orderId + '/' + returnCause,
    method: 'get',
  })
}
// 同意退货申请信息
export function AgreeGsReturn(orderId) {
  return request({
    url: '/GsReturn/agree/' + orderId,
    method: 'get',
  })
}
// 拒绝退货申请信息
export function RefuseGsReturn(orderId) {
  return request({
    url: '/GsReturn/refuse/' + orderId,
    method: 'get',
  })
}

